﻿using System.Reflection;
using System.Xml.Linq;

namespace System
{
	internal static partial class PackedResources
	{
		public static XDocument GetXDocument(string resourceName, string assemblyName = null)
		{
			return XDocument.Parse(GetString(resourceName, assemblyName));
		}

		public static XDocument GetXDocument(string resourceName, Assembly assembly)
		{
			return XDocument.Parse(GetString(resourceName, assembly));
		}

		public static XElement GetXElement(string resourceName, string assemblyName = null)
		{
			return XElement.Parse(GetString(resourceName, assemblyName));
		}

		public static XElement GetXElement(string resourceName, Assembly assembly)
		{
			return XElement.Parse(GetString(resourceName, assembly));
		}
	}
}